include 'class.smtp.php';
require_once('class.phpmailer.php');
$mail = new PHPMailer();
$config = array();
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'domain name hosted on our server';
$config['smtp_user'] = 'test@domain.com';
$config['smtp_pass'] = 'password';
$config['smtp_port'] = '25';
$mail->SetFrom('test@domain.com', 'username ');
$mail->Subject = $subject;

$mail->MsgHTML($message);


$mail->AddAddress("test@domain.com");
if ($mail->Send()) {
    echo "sent";
} else {
    echo "Mailer Error: " . $mail->ErrorInfo;
}